package mk.com.ldm.corepoint.implementation.client;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;

import mk.com.ldm.corepoint.implementation.shared.DataBaseObject;
import mk.com.ldm.corepoint.implementation.shared.Filter;
import mk.com.ldm.corepoint.implementation.shared.FormObject;
import mk.com.ldm.corepoint.implementation.shared.MenuObject;
import mk.com.ldm.corepoint.implementation.shared.TableRows;
import mk.com.ldm.corepoint.implementation.shared.WorkFlowObject;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface CoreServiceAsync {
	public void login(String username, String password ,AsyncCallback<String> callback);	
	public void loginCheck(String username, String hash, AsyncCallback<Boolean> callback);
	public void getJson(String username, String objectName, String type,  String name, AsyncCallback<String> callback);
	public void parseConfigObject(String username, String objectName, String type,  String name, AsyncCallback<FormObject> callback);
	public void parseWorkFlow(String username, String objectName, String type, String name,AsyncCallback<LinkedList<WorkFlowObject>> callback);
	public void getKeyValuePairFromTable(String table, ArrayList<DataBaseObject> columns, AsyncCallback<HashMap<String, String>> callback);
	public void getTableData(String username, String objectName, String type, String name, int page, int pageSize, 
							String order, HashMap<String, Filter> filters, AsyncCallback<TableRows> callback);
	public void parseMenuMap(AsyncCallback<LinkedList<MenuObject>> callback);
	public void fetchConfigObject(String objectName, String itemId, String type, String name, AsyncCallback<FormObject> callback);
	public void saveObject(FormObject form, String itemId,  String type, HashMap<String, String> params, AsyncCallback<ArrayList<String>> callback);
	public void deleteObject(String type, ArrayList<String> ids, AsyncCallback<Boolean> callback);
	public void validateListView(HashMap<String, String> params, String value, AsyncCallback<String> callback);
	public void generateReport(String username, String objectName, String objectType, String name, String order, HashMap<String, Filter> filters,  HashMap<String, Boolean> visible, int pageType, AsyncCallback<String> callback);
}